Add mingw directory for Windows port.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2002 06:19:45 +0000 (06:19 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2002 06:19:45 +0000 (06:19 +0000)
gpsbabel/mingw/Makefile [new file with mode: 0644]
gpsbabel/mingw/README.expat [new file with mode: 0644]
gpsbabel/mingw/include/expat.h [new file with mode: 0644]
gpsbabel/mingw/lib/libexpat.a [new file with mode: 0644]

diff --git a/gpsbabel/mingw/Makefile b/gpsbabel/mingw/Makefile
new file mode 100644 (file)
index 0000000..962ef5a
--- /dev/null
@@ -0,0 +1,9 @@
+CC=/home/robertl/cross-tools/bin/i386-mingw32msvc-gcc -Iinclude
+VPATH=..
+
+gpsbabel.exe:
+
+include ../Makefile
+
+gpsbabel.exe: $(OBJS)
+       $(CC) -static $(CFLAGS) $(OBJS) lib/libexpat.a -o gpsbabel.exe 
diff --git a/gpsbabel/mingw/README.expat b/gpsbabel/mingw/README.expat
new file mode 100644 (file)
index 0000000..ae51d66
--- /dev/null
@@ -0,0 +1 @@
+This expat library comes from http://sourceforge.net/projects/mingwrep/
diff --git a/gpsbabel/mingw/include/expat.h b/gpsbabel/mingw/include/expat.h
new file mode 100644 (file)
index 0000000..5fdab9c
--- /dev/null
@@ -0,0 +1,713 @@
+/*\r
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\r
+See the file COPYING for copying permission.\r
+*/\r
+\r
+#ifndef XmlParse_INCLUDED\r
+#define XmlParse_INCLUDED 1\r
+\r
+#include <stdlib.h>\r
+\r
+#ifndef XMLPARSEAPI\r
+#  ifdef __declspec\r
+#    define XMLPARSEAPI __declspec(dllimport)\r
+#  else\r
+#    define XMLPARSEAPI /* nothing */\r
+#  endif\r
+#endif  /* not defined XMLPARSEAPI */\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+typedef void *XML_Parser;\r
+\r
+/* Information is UTF-8 encoded. */\r
+typedef char XML_Char;\r
+typedef char XML_LChar;\r
+\r
+enum XML_Content_Type {\r
+  XML_CTYPE_EMPTY = 1,\r
+  XML_CTYPE_ANY,\r
+  XML_CTYPE_MIXED,\r
+  XML_CTYPE_NAME,\r
+  XML_CTYPE_CHOICE,\r
+  XML_CTYPE_SEQ\r
+};\r
+\r
+enum XML_Content_Quant {\r
+  XML_CQUANT_NONE,\r
+  XML_CQUANT_OPT,\r
+  XML_CQUANT_REP,\r
+  XML_CQUANT_PLUS\r
+};\r
+\r
+/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be\r
+   XML_CQUANT_NONE, and the other fields will be zero or NULL.\r
+   If type == XML_CTYPE_MIXED, then quant will be NONE or REP and\r
+   numchildren will contain number of elements that may be mixed in\r
+   and children point to an array of XML_Content cells that will be\r
+   all of XML_CTYPE_NAME type with no quantification.\r
+\r
+   If type == XML_CTYPE_NAME, then the name points to the name, and\r
+   the numchildren field will be zero and children will be NULL. The\r
+   quant fields indicates any quantifiers placed on the name.\r
+\r
+   CHOICE and SEQ will have name NULL, the number of children in\r
+   numchildren and children will point, recursively, to an array\r
+   of XML_Content cells.\r
+\r
+   The EMPTY, ANY, and MIXED types will only occur at top level.\r
+*/\r
+\r
+typedef struct XML_cp XML_Content;\r
+\r
+struct XML_cp {\r
+  enum XML_Content_Type                type;\r
+  enum XML_Content_Quant       quant;\r
+  const XML_Char *             name;\r
+  unsigned int                 numchildren;\r
+  XML_Content *                        children;\r
+};\r
+\r
+\r
+/* This is called for an element declaration. See above for\r
+   description of the model argument. It's the caller's responsibility\r
+   to free model when finished with it.\r
+*/\r
+\r
+typedef void (*XML_ElementDeclHandler) (void *userData,\r
+                                       const XML_Char *name,\r
+                                       XML_Content *model);\r
+\r
+void XMLPARSEAPI\r
+XML_SetElementDeclHandler(XML_Parser parser,\r
+                         XML_ElementDeclHandler eldecl);\r
+\r
+/*\r
+  The Attlist declaration handler is called for *each* attribute. So\r
+  a single Attlist declaration with multiple attributes declared will\r
+  generate multiple calls to this handler. The "default" parameter\r
+  may be NULL in the case of the "#IMPLIED" or "#REQUIRED" keyword.\r
+  The "isrequired" parameter will be true and the default value will\r
+  be NULL in the case of "#REQUIRED". If "isrequired" is true and\r
+  default is non-NULL, then this is a "#FIXED" default.\r
+ */\r
+\r
+typedef void (*XML_AttlistDeclHandler) (void           *userData,\r
+                                       const XML_Char  *elname,\r
+                                       const XML_Char  *attname,\r
+                                       const XML_Char  *att_type,\r
+                                       const XML_Char  *dflt,\r
+                                       int             isrequired);\r
+\r
+void XMLPARSEAPI\r
+XML_SetAttlistDeclHandler(XML_Parser parser,\r
+                         XML_AttlistDeclHandler attdecl);\r
+\r
+\r
+  /* The XML declaration handler is called for *both* XML declarations and\r
+     text declarations. The way to distinguish is that the version parameter\r
+     will be null for text declarations. The encoding parameter may be null\r
+     for XML declarations. The standalone parameter will be -1, 0, or 1\r
+     indicating respectively that there was no standalone parameter in\r
+     the declaration, that it was given as no, or that it was given as yes.\r
+  */\r
+\r
+typedef void (*XML_XmlDeclHandler) (void               *userData,\r
+                                   const XML_Char      *version,\r
+                                   const XML_Char      *encoding,\r
+                                   int                 standalone);\r
+\r
+void XMLPARSEAPI\r
+XML_SetXmlDeclHandler(XML_Parser parser,\r
+                     XML_XmlDeclHandler xmldecl);\r
+\r
+\r
+typedef struct {\r
+  void *(*malloc_fcn)(size_t size);\r
+  void *(*realloc_fcn)(void *ptr, size_t size);\r
+  void (*free_fcn)(void *ptr);\r
+} XML_Memory_Handling_Suite;\r
+\r
+/* Constructs a new parser; encoding is the encoding specified by the external\r
+protocol or null if there is none specified. */\r
+\r
+XML_Parser XMLPARSEAPI\r
+XML_ParserCreate(const XML_Char *encoding);\r
+\r
+/* Constructs a new parser and namespace processor.  Element type names\r
+and attribute names that belong to a namespace will be expanded;\r
+unprefixed attribute names are never expanded; unprefixed element type\r
+names are expanded only if there is a default namespace. The expanded\r
+name is the concatenation of the namespace URI, the namespace separator character,\r
+and the local part of the name.  If the namespace separator is '\0' then\r
+the namespace URI and the local part will be concatenated without any\r
+separator.  When a namespace is not declared, the name and prefix will be\r
+passed through without expansion. */\r
+\r
+XML_Parser XMLPARSEAPI\r
+XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);\r
+\r
+\r
+/* Constructs a new parser using the memory management suit referred to\r
+   by memsuite. If memsuite is NULL, then use the standard library memory\r
+   suite. If namespaceSeparator is non-NULL it creates a parser with\r
+   namespace processing as described above. The character pointed at\r
+   will serve as the namespace separator.\r
+\r
+   All further memory operations used for the created parser will come from\r
+   the given suite.\r
+*/\r
+\r
+XML_Parser XMLPARSEAPI\r
+XML_ParserCreate_MM(const XML_Char *encoding,\r
+                   const XML_Memory_Handling_Suite *memsuite,\r
+                   const XML_Char *namespaceSeparator);\r
+\r
+/* atts is array of name/value pairs, terminated by 0;\r
+   names and values are 0 terminated. */\r
+\r
+typedef void (*XML_StartElementHandler)(void *userData,\r
+                                       const XML_Char *name,\r
+                                       const XML_Char **atts);\r
+\r
+typedef void (*XML_EndElementHandler)(void *userData,\r
+                                     const XML_Char *name);\r
+\r
+\r
+/* s is not 0 terminated. */\r
+typedef void (*XML_CharacterDataHandler)(void *userData,\r
+                                        const XML_Char *s,\r
+                                        int len);\r
+\r
+/* target and data are 0 terminated */\r
+typedef void (*XML_ProcessingInstructionHandler)(void *userData,\r
+                                                const XML_Char *target,\r
+                                                const XML_Char *data);\r
+\r
+/* data is 0 terminated */\r
+typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data);\r
+\r
+typedef void (*XML_StartCdataSectionHandler)(void *userData);\r
+typedef void (*XML_EndCdataSectionHandler)(void *userData);\r
+\r
+/* This is called for any characters in the XML document for\r
+which there is no applicable handler.  This includes both\r
+characters that are part of markup which is of a kind that is\r
+not reported (comments, markup declarations), or characters\r
+that are part of a construct which could be reported but\r
+for which no handler has been supplied. The characters are passed\r
+exactly as they were in the XML document except that\r
+they will be encoded in UTF-8.  Line boundaries are not normalized.\r
+Note that a byte order mark character is not passed to the default handler.\r
+There are no guarantees about how characters are divided between calls\r
+to the default handler: for example, a comment might be split between\r
+multiple calls. */\r
+\r
+typedef void (*XML_DefaultHandler)(void *userData,\r
+                                  const XML_Char *s,\r
+                                  int len);\r
+\r
+/* This is called for the start of the DOCTYPE declaration, before\r
+   any DTD or internal subset is parsed. */\r
+\r
+typedef void (*XML_StartDoctypeDeclHandler)(void *userData,\r
+                                           const XML_Char *doctypeName,\r
+                                           const XML_Char *sysid,\r
+                                           const XML_Char *pubid,\r
+                                           int has_internal_subset\r
+                                           );\r
+\r
+/* This is called for the start of the DOCTYPE declaration when the\r
+closing > is encountered, but after processing any external subset. */\r
+typedef void (*XML_EndDoctypeDeclHandler)(void *userData);\r
+\r
+/* This is called for entity declarations. The is_parameter_entity\r
+   argument will be non-zero if the entity is a parameter entity, zero\r
+   otherwise.\r
+\r
+   For internal entities (<!ENTITY foo "bar">), value will\r
+   be non-null and systemId, publicID, and notationName will be null.\r
+   The value string is NOT null terminated; the length is provided in\r
+   the value_length argument. Since it is legal to have zero-length\r
+   values, do not use this argument to test for internal entities.\r
+\r
+   For external entities, value will be null and systemId will be non-null.\r
+   The publicId argument will be null unless a public identifier was\r
+   provided. The notationName argument will have a non-null value only\r
+   for unparsed entity declarations.\r
+*/\r
+\r
+typedef void (*XML_EntityDeclHandler) (void *userData,\r
+                                      const XML_Char *entityName,\r
+                                      int is_parameter_entity,\r
+                                      const XML_Char *value,\r
+                                      int value_length,\r
+                                      const XML_Char *base,\r
+                                      const XML_Char *systemId,\r
+                                      const XML_Char *publicId,\r
+                                      const XML_Char *notationName);\r
+                                      \r
+void XMLPARSEAPI\r
+XML_SetEntityDeclHandler(XML_Parser parser,\r
+                        XML_EntityDeclHandler handler);\r
+\r
+/* OBSOLETE -- OBSOLETE -- OBSOLETE\r
+   This handler has been superceded by the EntityDeclHandler above.\r
+   It is provided here for backward compatibility.\r
+This is called for a declaration of an unparsed (NDATA)\r
+entity.  The base argument is whatever was set by XML_SetBase.\r
+The entityName, systemId and notationName arguments will never be null.\r
+The other arguments may be. */\r
+\r
+typedef void (*XML_UnparsedEntityDeclHandler)(void *userData,\r
+                                             const XML_Char *entityName,\r
+                                             const XML_Char *base,\r
+                                             const XML_Char *systemId,\r
+                                             const XML_Char *publicId,\r
+                                             const XML_Char *notationName);\r
+\r
+/* This is called for a declaration of notation.\r
+The base argument is whatever was set by XML_SetBase.\r
+The notationName will never be null.  The other arguments can be. */\r
+\r
+typedef void (*XML_NotationDeclHandler)(void *userData,\r
+                                       const XML_Char *notationName,\r
+                                       const XML_Char *base,\r
+                                       const XML_Char *systemId,\r
+                                       const XML_Char *publicId);\r
+\r
+/* When namespace processing is enabled, these are called once for\r
+each namespace declaration. The call to the start and end element\r
+handlers occur between the calls to the start and end namespace\r
+declaration handlers. For an xmlns attribute, prefix will be null.\r
+For an xmlns="" attribute, uri will be null. */\r
+\r
+typedef void (*XML_StartNamespaceDeclHandler)(void *userData,\r
+                                             const XML_Char *prefix,\r
+                                             const XML_Char *uri);\r
+\r
+typedef void (*XML_EndNamespaceDeclHandler)(void *userData,\r
+                                           const XML_Char *prefix);\r
+\r
+/* This is called if the document is not standalone (it has an\r
+external subset or a reference to a parameter entity, but does not\r
+have standalone="yes"). If this handler returns 0, then processing\r
+will not continue, and the parser will return a\r
+XML_ERROR_NOT_STANDALONE error. */\r
+\r
+typedef int (*XML_NotStandaloneHandler)(void *userData);\r
+\r
+/* This is called for a reference to an external parsed general entity.\r
+The referenced entity is not automatically parsed.\r
+The application can parse it immediately or later using\r
+XML_ExternalEntityParserCreate.\r
+The parser argument is the parser parsing the entity containing the reference;\r
+it can be passed as the parser argument to XML_ExternalEntityParserCreate.\r
+The systemId argument is the system identifier as specified in the entity declaration;\r
+it will not be null.\r
+The base argument is the system identifier that should be used as the base for\r
+resolving systemId if systemId was relative; this is set by XML_SetBase;\r
+it may be null.\r
+The publicId argument is the public identifier as specified in the entity declaration,\r
+or null if none was specified; the whitespace in the public identifier\r
+will have been normalized as required by the XML spec.\r
+The context argument specifies the parsing context in the format\r
+expected by the context argument to\r
+XML_ExternalEntityParserCreate; context is valid only until the handler\r
+returns, so if the referenced entity is to be parsed later, it must be copied.\r
+The handler should return 0 if processing should not continue because of\r
+a fatal error in the handling of the external entity.\r
+In this case the calling parser will return an XML_ERROR_EXTERNAL_ENTITY_HANDLING\r
+error.\r
+Note that unlike other handlers the first argument is the parser, not userData. */\r
+\r
+typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,\r
+                                           const XML_Char *context,\r
+                                           const XML_Char *base,\r
+                                           const XML_Char *systemId,\r
+                                           const XML_Char *publicId);\r
+\r
+/* This structure is filled in by the XML_UnknownEncodingHandler\r
+to provide information to the parser about encodings that are unknown\r
+to the parser.\r
+The map[b] member gives information about byte sequences\r
+whose first byte is b.\r
+If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar value c.\r
+If map[b] is -1, then the byte sequence is malformed.\r
+If map[b] is -n, where n >= 2, then b is the first byte of an n-byte\r
+sequence that encodes a single Unicode scalar value.\r
+The data member will be passed as the first argument to the convert function.\r
+The convert function is used to convert multibyte sequences;\r
+s will point to a n-byte sequence where map[(unsigned char)*s] == -n.\r
+The convert function must return the Unicode scalar value\r
+represented by this byte sequence or -1 if the byte sequence is malformed.\r
+The convert function may be null if the encoding is a single-byte encoding,\r
+that is if map[b] >= -1 for all bytes b.\r
+When the parser is finished with the encoding, then if release is not null,\r
+it will call release passing it the data member;\r
+once release has been called, the convert function will not be called again.\r
+\r
+Expat places certain restrictions on the encodings that are supported\r
+using this mechanism.\r
+\r
+1. Every ASCII character that can appear in a well-formed XML document,\r
+other than the characters\r
+\r
+  $@\^`{}~\r
+\r
+must be represented by a single byte, and that byte must be the\r
+same byte that represents that character in ASCII.\r
+\r
+2. No character may require more than 4 bytes to encode.\r
+\r
+3. All characters encoded must have Unicode scalar values <= 0xFFFF,\r
+(ie characters that would be encoded by surrogates in UTF-16\r
+are  not allowed).  Note that this restriction doesn't apply to\r
+the built-in support for UTF-8 and UTF-16.\r
+\r
+4. No Unicode character may be encoded by more than one distinct sequence\r
+of bytes. */\r
+\r
+typedef struct {\r
+  int map[256];\r
+  void *data;\r
+  int (*convert)(void *data, const char *s);\r
+  void (*release)(void *data);\r
+} XML_Encoding;\r
+\r
+/* This is called for an encoding that is unknown to the parser.\r
+The encodingHandlerData argument is that which was passed as the\r
+second argument to XML_SetUnknownEncodingHandler.\r
+The name argument gives the name of the encoding as specified in\r
+the encoding declaration.\r
+If the callback can provide information about the encoding,\r
+it must fill in the XML_Encoding structure, and return 1.\r
+Otherwise it must return 0.\r
+If info does not describe a suitable encoding,\r
+then the parser will return an XML_UNKNOWN_ENCODING error. */\r
+\r
+typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData,\r
+                                         const XML_Char *name,\r
+                                         XML_Encoding *info);\r
+\r
+void XMLPARSEAPI\r
+XML_SetElementHandler(XML_Parser parser,\r
+                     XML_StartElementHandler start,\r
+                     XML_EndElementHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetCharacterDataHandler(XML_Parser parser,\r
+                           XML_CharacterDataHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetProcessingInstructionHandler(XML_Parser parser,\r
+                                   XML_ProcessingInstructionHandler handler);\r
+void XMLPARSEAPI\r
+XML_SetCommentHandler(XML_Parser parser,\r
+                      XML_CommentHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetCdataSectionHandler(XML_Parser parser,\r
+                          XML_StartCdataSectionHandler start,\r
+                          XML_EndCdataSectionHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetStartCdataSectionHandler(XML_Parser parser,\r
+                                XML_StartCdataSectionHandler start);\r
+\r
+void XMLPARSEAPI\r
+XML_SetEndCdataSectionHandler(XML_Parser parser,\r
+                              XML_EndCdataSectionHandler end);\r
+\r
+/* This sets the default handler and also inhibits expansion of internal entities.\r
+The entity reference will be passed to the default handler. */\r
+\r
+void XMLPARSEAPI\r
+XML_SetDefaultHandler(XML_Parser parser,\r
+                     XML_DefaultHandler handler);\r
+\r
+/* This sets the default handler but does not inhibit expansion of internal entities.\r
+The entity reference will not be passed to the default handler. */\r
+\r
+void XMLPARSEAPI\r
+XML_SetDefaultHandlerExpand(XML_Parser parser,\r
+                           XML_DefaultHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetDoctypeDeclHandler(XML_Parser parser,\r
+                         XML_StartDoctypeDeclHandler start,\r
+                         XML_EndDoctypeDeclHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetStartDoctypeDeclHandler(XML_Parser parser,\r
+                              XML_StartDoctypeDeclHandler start);\r
+\r
+void XMLPARSEAPI\r
+XML_SetEndDoctypeDeclHandler(XML_Parser parser,\r
+                            XML_EndDoctypeDeclHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetUnparsedEntityDeclHandler(XML_Parser parser,\r
+                                XML_UnparsedEntityDeclHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetNotationDeclHandler(XML_Parser parser,\r
+                          XML_NotationDeclHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetNamespaceDeclHandler(XML_Parser parser,\r
+                           XML_StartNamespaceDeclHandler start,\r
+                           XML_EndNamespaceDeclHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetStartNamespaceDeclHandler(XML_Parser parser,\r
+                                XML_StartNamespaceDeclHandler start);\r
+\r
+void XMLPARSEAPI\r
+XML_SetEndNamespaceDeclHandler(XML_Parser parser,\r
+                              XML_EndNamespaceDeclHandler end);\r
+\r
+void XMLPARSEAPI\r
+XML_SetNotStandaloneHandler(XML_Parser parser,\r
+                           XML_NotStandaloneHandler handler);\r
+\r
+void XMLPARSEAPI\r
+XML_SetExternalEntityRefHandler(XML_Parser parser,\r
+                               XML_ExternalEntityRefHandler handler);\r
+\r
+/* If a non-null value for arg is specified here, then it will be passed\r
+as the first argument to the external entity ref handler instead\r
+of the parser object. */\r
+void XMLPARSEAPI\r
+XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);\r
+\r
+void XMLPARSEAPI\r
+XML_SetUnknownEncodingHandler(XML_Parser parser,\r
+                             XML_UnknownEncodingHandler handler,\r
+                             void *encodingHandlerData);\r
+\r
+/* This can be called within a handler for a start element, end element,\r
+processing instruction or character data.  It causes the corresponding\r
+markup to be passed to the default handler. */\r
+void  XMLPARSEAPI\r
+XML_DefaultCurrent(XML_Parser parser);\r
+\r
+/* If do_nst is non-zero, and namespace processing is in effect, and\r
+   a name has a prefix (i.e. an explicit namespace qualifier) then\r
+   that name is returned as a triplet in a single\r
+   string separated by the separator character specified when the parser\r
+   was created: URI + sep + local_name + sep + prefix.\r
+\r
+   If do_nst is zero, then namespace information is returned in the\r
+   default manner (URI + sep + local_name) whether or not the names\r
+   has a prefix.\r
+*/\r
+\r
+void XMLPARSEAPI\r
+XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);\r
+\r
+/* This value is passed as the userData argument to callbacks. */\r
+void XMLPARSEAPI\r
+XML_SetUserData(XML_Parser parser, void *userData);\r
+\r
+/* Returns the last value set by XML_SetUserData or null. */\r
+#define XML_GetUserData(parser) (*(void **)(parser))\r
+\r
+/* This is equivalent to supplying an encoding argument\r
+to XML_ParserCreate. It must not be called after XML_Parse\r
+or XML_ParseBuffer. */\r
+\r
+int XMLPARSEAPI\r
+XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);\r
+\r
+/* If this function is called, then the parser will be passed\r
+as the first argument to callbacks instead of userData.\r
+The userData will still be accessible using XML_GetUserData. */\r
+\r
+void XMLPARSEAPI \r
+XML_UseParserAsHandlerArg(XML_Parser parser);\r
+\r
+/* Sets the base to be used for resolving relative URIs in system identifiers in\r
+declarations.  Resolving relative identifiers is left to the application:\r
+this value will be passed through as the base argument to the\r
+XML_ExternalEntityRefHandler, XML_NotationDeclHandler\r
+and XML_UnparsedEntityDeclHandler. The base argument will be copied.\r
+Returns zero if out of memory, non-zero otherwise. */\r
+\r
+int XMLPARSEAPI\r
+XML_SetBase(XML_Parser parser, const XML_Char *base);\r
+\r
+const XML_Char  XMLPARSEAPI *\r
+XML_GetBase(XML_Parser parser);\r
+\r
+/* Returns the number of the attribute/value pairs passed in last call\r
+to the XML_StartElementHandler that were specified in the start-tag\r
+rather than defaulted. Each attribute/value pair counts as 2; thus\r
+this correspondds to an index into the atts array passed to the\r
+XML_StartElementHandler. */\r
+\r
+int XMLPARSEAPI\r
+XML_GetSpecifiedAttributeCount(XML_Parser parser);\r
+\r
+/* Returns the index of the ID attribute passed in the last call to\r
+XML_StartElementHandler, or -1 if there is no ID attribute.  Each\r
+attribute/value pair counts as 2; thus this correspondds to an index\r
+into the atts array passed to the XML_StartElementHandler. */\r
+\r
+int XMLPARSEAPI\r
+XML_GetIdAttributeIndex(XML_Parser parser);\r
+\r
+/* Parses some input. Returns 0 if a fatal error is detected.\r
+The last call to XML_Parse must have isFinal true;\r
+len may be zero for this call (or any other). */\r
+int XMLPARSEAPI\r
+XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);\r
+\r
+void XMLPARSEAPI *\r
+XML_GetBuffer(XML_Parser parser, int len);\r
+\r
+int XMLPARSEAPI\r
+XML_ParseBuffer(XML_Parser parser, int len, int isFinal);\r
+\r
+/* Creates an XML_Parser object that can parse an external general entity;\r
+context is a '\0'-terminated string specifying the parse context;\r
+encoding is a '\0'-terminated string giving the name of the externally specified encoding,\r
+or null if there is no externally specified encoding.\r
+The context string consists of a sequence of tokens separated by formfeeds (\f);\r
+a token consisting of a name specifies that the general entity of the name\r
+is open; a token of the form prefix=uri specifies the namespace for a particular\r
+prefix; a token of the form =uri specifies the default namespace.\r
+This can be called at any point after the first call to an ExternalEntityRefHandler\r
+so longer as the parser has not yet been freed.\r
+The new parser is completely independent and may safely be used in a separate thread.\r
+The handlers and userData are initialized from the parser argument.\r
+Returns 0 if out of memory.  Otherwise returns a new XML_Parser object. */\r
+XML_Parser XMLPARSEAPI\r
+XML_ExternalEntityParserCreate(XML_Parser parser,\r
+                              const XML_Char *context,\r
+                              const XML_Char *encoding);\r
+\r
+enum XML_ParamEntityParsing {\r
+  XML_PARAM_ENTITY_PARSING_NEVER,\r
+  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,\r
+  XML_PARAM_ENTITY_PARSING_ALWAYS\r
+};\r
+\r
+/* Controls parsing of parameter entities (including the external DTD\r
+subset). If parsing of parameter entities is enabled, then references\r
+to external parameter entities (including the external DTD subset)\r
+will be passed to the handler set with\r
+XML_SetExternalEntityRefHandler.  The context passed will be 0.\r
+Unlike external general entities, external parameter entities can only\r
+be parsed synchronously.  If the external parameter entity is to be\r
+parsed, it must be parsed during the call to the external entity ref\r
+handler: the complete sequence of XML_ExternalEntityParserCreate,\r
+XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during\r
+this call.  After XML_ExternalEntityParserCreate has been called to\r
+create the parser for the external parameter entity (context must be 0\r
+for this call), it is illegal to make any calls on the old parser\r
+until XML_ParserFree has been called on the newly created parser.  If\r
+the library has been compiled without support for parameter entity\r
+parsing (ie without XML_DTD being defined), then\r
+XML_SetParamEntityParsing will return 0 if parsing of parameter\r
+entities is requested; otherwise it will return non-zero. */\r
+\r
+int XMLPARSEAPI\r
+XML_SetParamEntityParsing(XML_Parser parser,\r
+                         enum XML_ParamEntityParsing parsing);\r
+\r
+enum XML_Error {\r
+  XML_ERROR_NONE,\r
+  XML_ERROR_NO_MEMORY,\r
+  XML_ERROR_SYNTAX,\r
+  XML_ERROR_NO_ELEMENTS,\r
+  XML_ERROR_INVALID_TOKEN,\r
+  XML_ERROR_UNCLOSED_TOKEN,\r
+  XML_ERROR_PARTIAL_CHAR,\r
+  XML_ERROR_TAG_MISMATCH,\r
+  XML_ERROR_DUPLICATE_ATTRIBUTE,\r
+  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,\r
+  XML_ERROR_PARAM_ENTITY_REF,\r
+  XML_ERROR_UNDEFINED_ENTITY,\r
+  XML_ERROR_RECURSIVE_ENTITY_REF,\r
+  XML_ERROR_ASYNC_ENTITY,\r
+  XML_ERROR_BAD_CHAR_REF,\r
+  XML_ERROR_BINARY_ENTITY_REF,\r
+  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,\r
+  XML_ERROR_MISPLACED_XML_PI,\r
+  XML_ERROR_UNKNOWN_ENCODING,\r
+  XML_ERROR_INCORRECT_ENCODING,\r
+  XML_ERROR_UNCLOSED_CDATA_SECTION,\r
+  XML_ERROR_EXTERNAL_ENTITY_HANDLING,\r
+  XML_ERROR_NOT_STANDALONE,\r
+  XML_ERROR_UNEXPECTED_STATE\r
+};\r
+\r
+/* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode\r
+returns information about the error. */\r
+\r
+enum XML_Error  XMLPARSEAPI\r
+XML_GetErrorCode(XML_Parser parser);\r
+\r
+/* These functions return information about the current parse location.\r
+They may be called when XML_Parse or XML_ParseBuffer return 0;\r
+in this case the location is the location of the character at which\r
+the error was detected.\r
+They may also be called from any other callback called to report\r
+some parse event; in this the location is the location of the first\r
+of the sequence of characters that generated the event. */\r
+\r
+int XMLPARSEAPI XML_GetCurrentLineNumber(XML_Parser parser);\r
+int XMLPARSEAPI XML_GetCurrentColumnNumber(XML_Parser parser);\r
+long XMLPARSEAPI XML_GetCurrentByteIndex(XML_Parser parser);\r
+\r
+/* Return the number of bytes in the current event.\r
+Returns 0 if the event is in an internal entity. */\r
+\r
+int XMLPARSEAPI\r
+XML_GetCurrentByteCount(XML_Parser parser);\r
+\r
+/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets\r
+   the integer pointed to by offset to the offset within this buffer\r
+   of the current parse position, and sets the integer pointed to by size\r
+   to the size of this buffer (the number of input bytes). Otherwise\r
+   returns a null pointer. Also returns a null pointer if a parse isn't active.\r
+\r
+   NOTE: The character pointer returned should not be used outside\r
+   the handler that makes the call. */\r
+\r
+const char XMLPARSEAPI *\r
+XML_GetInputContext(XML_Parser parser,\r
+                   int *offset,\r
+                   int *size);\r
+\r
+/* For backwards compatibility with previous versions. */\r
+#define XML_GetErrorLineNumber XML_GetCurrentLineNumber\r
+#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber\r
+#define XML_GetErrorByteIndex XML_GetCurrentByteIndex\r
+\r
+/* Frees memory used by the parser. */\r
+void XMLPARSEAPI\r
+XML_ParserFree(XML_Parser parser);\r
+\r
+/* Returns a string describing the error. */\r
+const XML_LChar XMLPARSEAPI *\r
+XML_ErrorString(int code);\r
+\r
+/* Return a string containing the version number of this expat */\r
+const XML_LChar XMLPARSEAPI *\r
+XML_ExpatVersion();\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* not XmlParse_INCLUDED */\r
diff --git a/gpsbabel/mingw/lib/libexpat.a b/gpsbabel/mingw/lib/libexpat.a
new file mode 100644 (file)
index 0000000..d4a3982
Binary files /dev/null and b/gpsbabel/mingw/lib/libexpat.a differ